-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AuthHandshakeMessageHandler: also try Basic auth when username is '<token>'. #43354
Conversation
…oken>'. OpenShift's image registry expects the '<token>' username to be handled using the Basic auth scheme.
I want to know more about how/why Docker/Podman work with OpenShift. From my reading of the Basic auth handler in regclient the Basic auth only uses username/password credentials, never Token-based credentials. The Token-based credentials are only used with Bearer auth. Digging way down into how Docker does auth, I see everything relies on what's parsed from the WWW-authenticate header from the registry - can you see what's in the WWW-authenticate header when you ping your OpenShift registry? |
@baronfel I tried to keep this PR focused on something backportable to .NET 9 so we can have working auth against the OpenShift registry. I'm also interested in understanding better how docker/podman work so we can align on their behavior. I assume that may mean a bigger (and riskier) change.
Not sure if this matters, the auth is stored as: {
"auths": {
"default-route-openshift-image-registry.apps.sandbox-m3.1530.p1.openshiftapps.com": {
"auth": "..."
}
}
} And
It is:
The full response is:
|
That |
Me too. I'm going to try and figure out what |
Here it is: When the server responds with And in the I tried both Currently the PR adds the To align further with |
I'll take a closer look at this and make a separate PR so we know what those changes would be. I hope to find some time for it next week or the week after. |
WIP: #43491 |
Closing in favor of #43491. |
OpenShift's image registry expects the '<token>' username to be handled using the Basic auth scheme.
Fixes #43319.
@baronfel ptal.